/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class DefaultaccessproviderPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "rolProviderId")
    private int rolProviderId;
    @Basic(optional = false)
    @Column(name = "menuProviderId")
    private short menuProviderId;
    @Basic(optional = false)
    @Column(name = "submenuProviderId")
    private short submenuProviderId;
    @Basic(optional = false)
    @Column(name = "optionProviderId")
    private short optionProviderId;

    public DefaultaccessproviderPK() {
    }

    public DefaultaccessproviderPK(int rolProviderId, short menuProviderId, short submenuProviderId, short optionProviderId) {
        this.rolProviderId = rolProviderId;
        this.menuProviderId = menuProviderId;
        this.submenuProviderId = submenuProviderId;
        this.optionProviderId = optionProviderId;
    }

    public int getRolProviderId() {
        return rolProviderId;
    }

    public void setRolProviderId(int rolProviderId) {
        this.rolProviderId = rolProviderId;
    }

    public short getMenuProviderId() {
        return menuProviderId;
    }

    public void setMenuProviderId(short menuProviderId) {
        this.menuProviderId = menuProviderId;
    }

    public short getSubmenuProviderId() {
        return submenuProviderId;
    }

    public void setSubmenuProviderId(short submenuProviderId) {
        this.submenuProviderId = submenuProviderId;
    }

    public short getOptionProviderId() {
        return optionProviderId;
    }

    public void setOptionProviderId(short optionProviderId) {
        this.optionProviderId = optionProviderId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) rolProviderId;
        hash += (int) menuProviderId;
        hash += (int) submenuProviderId;
        hash += (int) optionProviderId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DefaultaccessproviderPK)) {
            return false;
        }
        DefaultaccessproviderPK other = (DefaultaccessproviderPK) object;
        if (this.rolProviderId != other.rolProviderId) {
            return false;
        }
        if (this.menuProviderId != other.menuProviderId) {
            return false;
        }
        if (this.submenuProviderId != other.submenuProviderId) {
            return false;
        }
        if (this.optionProviderId != other.optionProviderId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.DefaultaccessproviderPK[ rolProviderId=" + rolProviderId + ", menuProviderId=" + menuProviderId + ", submenuProviderId=" + submenuProviderId + ", optionProviderId=" + optionProviderId + " ]";
    }
    
}
